import { constantRoutes } from '@/router'

export default {
  namespaced: true,
  state: {
    // 以静态路由表作为初始值
    menus: [...constantRoutes]
  },
  mutations: {
    setMenus (state, filterRoutes) {
      // 组合静态路由表和筛选之后的动态路由表 = 可以在左侧显示的完整路由表
      state.menus = [...constantRoutes, ...filterRoutes]
    }
  }
}
